home *** CD-ROM | disk | FTP | other *** search
- --------------------------------------------------
- -- Created By: Alberto
- -- Description: <short_description>
- --------------------------
- --
-
- AIBehaviour.Drone = {
- Name = "Drone",
- pathname = "",
-
- -- SYSTEM EVENTS -----
- ---------------------------------------------
- OnSelected = function( self, entity )
- end,
- ---------------------------------------------
- OnSpawn = function( self, entity )
- -- called when enemy spawned or reset
- AI:CreateGoalPipe("approachandfire");
- AI:PushGoal("approachandfire","firecmd",0,1);
- AI:PushGoal("approachandfire","approach",1,0.5);
- AI:PushGoal("approachandfire","timeout",1,1);
-
- entity:SelectPipe(0,"approachandfire");
- end,
- ---------------------------------------------
- OnActivate = function( self, entity )
- -- called when enemy receives an activate event (from a trigger, for example)
- end,
- ---------------------------------------------
- OnNoTarget = function( self, entity )
- -- called when the enemy stops having an attention target
- end,
- ---------------------------------------------
- OnPlayerSeen = function( self, entity, fDistance )
- -- called when the enemy sees a living player
- entity:SelectPipe(0,"approachandfire");
- end,
- ---------------------------------------------
- OnEnemySeen = function( self, entity )
- -- called when the enemy sees a foe which is not a living player
- entity:SelectPipe(0,"approachandfire");
- end,
- ---------------------------------------------
- OnFriendSeen = function( self, entity )
- -- called when the enemy sees a friendly target
- entity:SelectPipe(0,"approachandfire");
- end,
- ---------------------------------------------
- OnDeadBodySeen = function( self, entity )
- -- called when the enemy a dead body
- end,
- ---------------------------------------------
- OnEnemyMemory = function( self, entity )
- -- called when the enemy can no longer see its foe, but remembers where it saw it last
- end,
- ---------------------------------------------
- OnInterestingSoundHeard = function( self, entity )
- -- called when the enemy hears an interesting sound
- entity:SelectPipe(0,"approachandfire");
- end,
- ---------------------------------------------
- OnThreateningSoundHeard = function( self, entity )
- -- called when the enemy hears a scary sound
- entity:SelectPipe(0,"approachandfire");
- end,
- ---------------------------------------------
- OnReload = function( self, entity,sender )
- -- called when the enemy goes into automatic reload after its clip is empty
- end,
- ---------------------------------------------
- OnClipNearlyEmpty = function( self, entity, sender )
- -- called when the enemy has less than 30% left in his clip
- end,
- ---------------------------------------------
- OnGroupMemberDied = function( self, entity )
- -- called when a member of the group dies
- end,
- ---------------------------------------------
- OnNoHidingPlace = function( self, entity, sender )
- -- called when no hiding place can be found with the specified parameters
- end,
- ---------------------------------------------
- OnReceivingDamage = function ( self, entity, sender)
- -- called when the enemy is damaged
- end,
-
- }